//
//  RESTfulEngine.h
//  JingMai
//
//  Created by 戴怀诚 on 15/7/3.
//  Copyright (c) 2015年 戴怀诚. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "RESTfulOperation.h"
#import "MKNetworkEngine.h"

@interface RESTfulEngine : MKNetworkEngine {    
    NSString *_accessToken;
}

typedef void (^VoidBlock)(void);
typedef void (^OneSenderBlock)(id sender);
typedef void (^ErrorBlock)(NSError *engineError);

@property (nonatomic, strong) NSString *accessToken;

// 登录
- (id)loginWithName:(NSString*)loginName
              vcode:(NSString*)vcode
        onSucceeded:(VoidBlock)succeededBlock
            onError:(ErrorBlock)errorBlock;

- (id)requestUploadTokenOnSucceeded:(OneSenderBlock)succeededBlock
                        onError:(ErrorBlock)errorBlock;

@end
